package com.bto.solar.work.dto.lease;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author 王小波
 * @description:
 * @date 2023/8/3 8:19
 */
@NoArgsConstructor
@Data
public class OperatingSignBody {

    @JsonProperty("prjProject")
    private PrjProjectDTO prjProject;
    @JsonProperty("prjProjectLeaseItemList")
    private List<PrjProjectLeaseItemListDTO> prjProjectLeaseItemList;
    @JsonProperty("prjProjectAccountList")
    private List<PrjProjectAccountListDTO> prjProjectAccountList;

    @NoArgsConstructor
    @Data
    public static class PrjProjectDTO {
        @JsonProperty("partnersContractNumber")
        private String partnersContractNumber;
        @JsonProperty("gridTiedDate")
        private String gridTiedDate;
        @JsonProperty("informationType")
        private String informationType;
    }

    @NoArgsConstructor
    @Data
    public static class PrjProjectLeaseItemListDTO {
        @JsonProperty("partnersLeaseItemId")
        private String partnersLeaseItemId;
        @JsonProperty("moduleProducer")
        private String moduleProducer;
        @JsonProperty("productModel")
        private String productModel;
        @JsonProperty("inverterNumber")
        private String inverterNumber;
        @JsonProperty("installedCapacity")
        private Integer installedCapacity;
        @JsonProperty("inverterBrand")
        private String inverterBrand;
        @JsonProperty("inverterModel")
        private String inverterModel;
        @JsonProperty("moduleQuantity")
        private Integer moduleQuantity;
        @JsonProperty("addressConsistent")
        private String addressConsistent;
        @JsonProperty("electricProvinceCode")
        private String electricProvinceCode;
        @JsonProperty("electricCityCode")
        private String electricCityCode;
        @JsonProperty("electricAreaCode")
        private String electricAreaCode;
        @JsonProperty("electricAddress")
        private String electricAddress;
        @JsonProperty("insuranceList")
        private List<InsuranceListDTO> insuranceList;
        @JsonProperty("moduleList")
        private List<ModuleListDTO> moduleList;

        @NoArgsConstructor
        @Data
        public static class InsuranceListDTO {
            @JsonProperty("insuranceType")
            private String insuranceType;
            @JsonProperty("insuranceDateFrom")
            private String insuranceDateFrom;
            @JsonProperty("insuranceDateTo")
            private String insuranceDateTo;
            @JsonProperty("insuranceCompany")
            private String insuranceCompany;
            @JsonProperty("insuranceNumber")
            private String insuranceNumber;
            @JsonProperty("insuranceAmount")
            private Double insuranceAmount;
            @JsonProperty("firstBeneficiary")
            private String firstBeneficiary;
        }

        @NoArgsConstructor
        @Accessors(chain = true)
        @Data
        public static class ModuleListDTO {
            @JsonProperty("moduleCode")
            private String moduleCode;
        }
    }

    @NoArgsConstructor
    @Data
    public static class PrjProjectAccountListDTO {
        @JsonProperty("accountType")
        private String accountType;
        @JsonProperty("accountName")
        private String accountName;
        @JsonProperty("accountNumber")
        private String accountNumber;
        @JsonProperty("tssBankNumber")
        private String tssBankNumber;
        @JsonProperty("elecCode")
        private String elecCode;
    }
}
